Optimal. Leaf size=40 \[ -\frac{(a+2 b) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0308706, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3012, 3770} \[ -\frac{(a+2 b) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3012
Rule 3770
Rubi steps
\begin{align*} \int \csc ^3(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx &=-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}+\frac{1}{2} (a+2 b) \int \csc (c+d x) \, dx\\ &=-\frac{(a+2 b) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}\\ \end{align*}
Mathematica [B] time = 0.0373156, size = 118, normalized size = 2.95 \[ -\frac{a \csc ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{a \sec ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{a \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}-\frac{a \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}+\frac{b \log \left (\sin \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d}-\frac{b \log \left (\cos \left (\frac{c}{2}+\frac{d x}{2}\right )\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.055, size = 63, normalized size = 1.6 \begin{align*} -{\frac{\cot \left ( dx+c \right ) a\csc \left ( dx+c \right ) }{2\,d}}+{\frac{a\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{2\,d}}+{\frac{b\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.936022, size = 78, normalized size = 1.95 \begin{align*} -\frac{{\left (a + 2 \, b\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) -{\left (a + 2 \, b\right )} \log \left (\cos \left (d x + c\right ) - 1\right ) - \frac{2 \, a \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.70168, size = 246, normalized size = 6.15 \begin{align*} \frac{2 \, a \cos \left (d x + c\right ) -{\left ({\left (a + 2 \, b\right )} \cos \left (d x + c\right )^{2} - a - 2 \, b\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) +{\left ({\left (a + 2 \, b\right )} \cos \left (d x + c\right )^{2} - a - 2 \, b\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{4 \,{\left (d \cos \left (d x + c\right )^{2} - d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.18255, size = 163, normalized size = 4.08 \begin{align*} \frac{2 \,{\left (a + 2 \, b\right )} \log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) + \frac{{\left (a - \frac{2 \, a{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac{4 \, b{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}{\left (\cos \left (d x + c\right ) + 1\right )}}{\cos \left (d x + c\right ) - 1} - \frac{a{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]